package com.piece.module.flowable.dto;

import com.piece.core.framework.util.object.ObjectUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("流程详情视图对象")
public class WfDetail implements Serializable {

    @ApiModelProperty("任务表单信息")
    private FormConf taskFormData;

    @ApiModelProperty("历史任务信息")
    private List<WfTask> historyTaskList;

    @ApiModelProperty("流程表单列表")
    private List<FormConf> processFormList;

    @ApiModelProperty("流程变量")
    private Map<String, Object> variables;

    /**
     * 是否存在任务表单信息
     */
    public Boolean isExistTaskForm() {
        return ObjectUtil.isNotEmpty(this.taskFormData);
    }
}
